export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './User/Login' },
      { name: '注册', path: '/user/register', component: './User/Register'},

    ],
  },
  { path: '/welcome', name: '首页', icon: 'smile', component: './Welcome' },
  { icon:'user', name: '个人信息页', path: '/userInfo', component: './User/UserInfo'},
  { layout: true, icon:'table',name: '借阅历史', path: '/history', component: './User/History'},

  {
    path: '/book',
    name: '书籍',
    icon: 'profile',
    layout: true,
    routes: [
      { path: '/book', redirect: "/book/landingPage"},
      { name: '书籍展示页', path: '/book/landingPage', component: './Book/BookLandingPage' },
      { name: '书籍详情页', path: '/book/detail/:bookId', component: './Book/BookDetail'},
      { name: '书籍归还页', path: '/book/return', component: './Book/BookReturnPage'},
      { name: '搜索页', path: '/book/search/:name', component: './Search'},
    ],
  },

  {
    path: '/admin',
    name: '管理页crown',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/sub-page' },
      { path: '/admin/sub-page', name: '二级管理页', component: './Admin' },
    ],
  },
  { name: '新页面', path: '/newPage',layout: true , component: './NewPage'},
  { path: '/', redirect: '/welcome' },
  { path: '*', layout: false, component: './404' },

];
